import request from '@/utils/request'

export default {
  // 删除讲师
  removeAlgorithmById(id) {
    return request({
      url: `/algorithm/cbyalgorithm7002/${id}`,
      method: 'delete'
    })
  },
  //添加讲师
  addAlgorithm(tube) {
    return request({
      url: `/algorithm/cbyalgorithm7002/addAlgorithm`,
      method: 'post',
      data: tube
    })
  },
  //查询讲师信息
  getAlgorithmInfo(id) {
    return request({
      url: `/algorithm/cbyalgorithm7002/getAlgorithm/${id}`,
      method: 'get',
    })
  },

  //修改讲师
  updateAlgorithm(tube) {
    return request({
      url: `/algorithm/cbyalgorithm7002/updateAlgorithm`,
      method: 'post',
      data: tube
    })
  },

  getAlgorithmListPage(current, limit, algorithmQuery) {
    console.log(algorithmQuery.name)
    console.log(algorithmQuery.typeId)
    return request({
      url: `/algorithm/cbyalgorithm7002/pageAlgorithmCondition/${current}/${limit}`,
      method: 'post',
      data: algorithmQuery
    })
  },

  getAlgorithmList() {
    return request({
      url: `/algorithm/cbyalgorithm7002/queryAllAlgorithm`,
      method: 'get',
    })
  },
}
